package com.zmn.plat.manager.dictionary;

import com.zmn.common.dictionary.DictModel;

import java.util.ArrayList;
import java.util.List;

/**
 * 备件字典
 * @author nowind
 * @since 2017/11/6 18:06
 */
public class SpareDict {

    public final static int PLEDGE_TYPE_NO                  = 1;        //抵押方式，无抵押
    public final static int PLEDGE_TYPE_HOUSE               = 2;        //抵押方式，抵押房产
    public final static int PLEDGE_TYPE_CAR                 = 3;        //抵押方式，抵押车辆
    public final static int PLEDGE_TYPE_HOUSEORCAR          = 4;        //抵押方式，抵押房产或车辆

    public final static int CUSTOMER_TYPE_NO                = 1;        //客户人群，不限
    public final static int CUSTOMER_TYPE_WORKER            = 2;        //客户人群，上班人士
    public final static int CUSTOMER_TYPE_EMPLOYER          = 3;        //客户人群，企业主
    public final static int CUSTOMER_TYPE_DEALER            = 4;        //客户人群，个体户

    public final static int DEADLINE_UNIT_DAY               = 1;        //期限单位，天
    public final static int DEADLINE_UNIT_MONTH             = 2;        //期限单位，月
    public final static int DEADLINE_UNIT_YEAR              = 3;        //期限单位，年


    //region 抵押方式
    public static String getPledgeType(int key) {

        switch (key) {
            case 1: return "无抵押";
            case 2: return "抵押房产";
            case 3: return "抵押车辆";
            case 4: return "抵押房产或车辆";
            default: return "";
        }
    }

    public static List<DictModel> getPledgeTypeList() {

        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "无抵押"));
        items.add(new DictModel(2, "抵押房产"));
        items.add(new DictModel(3, "抵押车辆"));
        items.add(new DictModel(4, "抵押房产或车辆"));
        return items;
    }
    //endregion


    //region 客户人群
    public static String getCustomerType(int key) {

        switch (key) {
            case 1: return "不限";
            case 2: return "上班人士";
            case 3: return "企业主";
            case 4: return "个体户";
            default: return "";
        }
    }

    public static List<DictModel> getCustomerTypeList() {

        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "不限"));
        items.add(new DictModel(2, "上班人士"));
        items.add(new DictModel(3, "企业主"));
        items.add(new DictModel(4, "个体户"));
        return items;
    }
    //endregion


    //region 放款速度
    public static String getLoanSpeed(int key) {

        switch (key) {
            case 1: return "1小时";
            case 2: return "2小时";
            case 3: return "3小时";
            case 6: return "6小时";
            case 12: return "12小时";
            case 24: return "24小时";
            case 48: return "2天";
            case 72: return "3天";
            case 168: return "7天";
            case 240: return "10天";
            case 336: return "14天";
            case 480: return "20天";
            case 720: return "30天";
            default: return "";
        }
    }

    public static List<DictModel> getLoanSpeedList() {

        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "1小时"));
        items.add(new DictModel(2, "2小时"));
        items.add(new DictModel(3, "3小时"));
        items.add(new DictModel(6, "6小时"));
        items.add(new DictModel(12, "12小时"));
        items.add(new DictModel(24, "24小时"));
        items.add(new DictModel(48, "2天"));
        items.add(new DictModel(72, "3天"));
        items.add(new DictModel(168, "7天"));
        items.add(new DictModel(240, "10天"));
        items.add(new DictModel(336, "14天"));
        items.add(new DictModel(480, "20天"));
        items.add(new DictModel(720, "30天"));
        return items;
    }
    //endregion

    //region 期限单位
    public static String getDeadlineUnit(int key) {

        switch (key) {
            case 1: return "天";
            case 2: return "月";
            case 3: return "年";
            default: return "";
        }
    }

    public static List<DictModel> getDeadlineUnitList() {

        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "天"));
        items.add(new DictModel(2, "月"));
        items.add(new DictModel(3, "年"));
        return items;
    }
    //endregion

}
